class: center, middle, inverse, title-slide # Lecture 21 ## Linear Regression ### Psych 10 C ### University of California, Irvine ### 05/18/2022 --- ## Linear regression - Last class we finished our example with multiple linear regression in a mental rotation task. -- - Today we will look at another example, however, this time we will not have a hypothesis, so we will have to take a "brute force" approach. -- - We are interested in studying the effects of age and height on blood pressure. -- - We are not sure if only one or both of this variables are good predictors so we want to compare all the models that we can build using these two variables. -- - This will be similar to the notion of main effects and interactions in factorial designs. --- ## Data - Now that we have a research question (are height and age good predictors of blood pressure), we need to look at the data in the study. -- - There are 50 participants in this study, all of whom had their blood pressure taken during a routine check up. The average blood pressure of participants was 116.42 (mmHg), with a range 92 to 144. -- - The age of the participants ranged from 20 to 70, with an average of 44.64 years. -- - The height of participants ranged from 58.3 to 75.8 with an average of 66.894 inches. -- - From those participants in the study 25 are female and the rest are male. --- ## Models - Now that we have a description of the data we can visualize our observations using a scatter plot, in this case we are interested in two variables (age and height) so we can make two independent graphs. -- .pull-left[ <img src="data:image/png;base64,#lec-21_files/figure-html/blood-age-1.png" style="display: block; margin: auto;" /> ] .pull-right[ <img src="data:image/png;base64,#lec-21_files/figure-html/blood-height-1.png" style="display: block; margin: auto;" /> ]